package com.miyu.client1.pojo.book;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "book_list_info")
public class BookListInfo {
    private String bookId;
    private String bookSource;
    private String bookName;
    private String bookAuthor;
    private String bookKind;
    private String bookState;
    private String bookCover;
    private String bookDuce;
    private String bookLastChapter;
    private String bookLastChapterUrl;
    private String bookSourceRoot;
    private String bookSourceName;
    private String bookRuleSource;

    @Id
    @Column(name = "book_id")
    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    @Basic
    @Column(name = "book_source")
    public String getBookSource() {
        return bookSource;
    }

    public void setBookSource(String bookSource) {
        this.bookSource = bookSource;
    }

    @Basic
    @Column(name = "book_name")
    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    @Basic
    @Column(name = "book_author")
    public String getBookAuthor() {
        return bookAuthor;
    }

    public void setBookAuthor(String bookAuthor) {
        this.bookAuthor = bookAuthor;
    }

    @Basic
    @Column(name = "book_kind")
    public String getBookKind() {
        return bookKind;
    }

    public void setBookKind(String bookKind) {
        this.bookKind = bookKind;
    }

    @Basic
    @Column(name = "book_state")
    public String getBookState() {
        return bookState;
    }

    public void setBookState(String bookState) {
        this.bookState = bookState;
    }

    @Basic
    @Column(name = "book_cover")
    public String getBookCover() {
        return bookCover;
    }

    public void setBookCover(String bookCover) {
        this.bookCover = bookCover;
    }

    @Basic
    @Column(name = "book_duce")
    public String getBookDuce() {
        return bookDuce;
    }

    public void setBookDuce(String bookDuce) {
        this.bookDuce = bookDuce;
    }

    @Basic
    @Column(name = "book_last_chapter")
    public String getBookLastChapter() {
        return bookLastChapter;
    }

    public void setBookLastChapter(String bookLastChapter) {
        this.bookLastChapter = bookLastChapter;
    }

    @Basic
    @Column(name = "book_last_chapter_url")
    public String getBookLastChapterUrl() {
        return bookLastChapterUrl;
    }

    public void setBookLastChapterUrl(String bookLastChapterUrl) {
        this.bookLastChapterUrl = bookLastChapterUrl;
    }

    @Basic
    @Column(name = "book_source_root")
    public String getBookSourceRoot() {
        return bookSourceRoot;
    }

    public void setBookSourceRoot(String bookSourceRoot) {
        this.bookSourceRoot = bookSourceRoot;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BookListInfo that = (BookListInfo) o;
        return Objects.equals(bookId, that.bookId) &&
                Objects.equals(bookSource, that.bookSource) &&
                Objects.equals(bookName, that.bookName) &&
                Objects.equals(bookAuthor, that.bookAuthor) &&
                Objects.equals(bookKind, that.bookKind) &&
                Objects.equals(bookState, that.bookState) &&
                Objects.equals(bookCover, that.bookCover) &&
                Objects.equals(bookDuce, that.bookDuce) &&
                Objects.equals(bookLastChapter, that.bookLastChapter) &&
                Objects.equals(bookLastChapterUrl, that.bookLastChapterUrl) &&
                Objects.equals(bookSourceRoot, that.bookSourceRoot);
    }

    @Override
    public int hashCode() {
        return Objects.hash(bookId, bookSource, bookName, bookAuthor, bookKind, bookState, bookCover, bookDuce, bookLastChapter, bookLastChapterUrl, bookSourceRoot);
    }

    @Basic
    @Column(name = "book_source_name")
    public String getBookSourceName() {
        return bookSourceName;
    }

    public void setBookSourceName(String bookSourceName) {
        this.bookSourceName = bookSourceName;
    }

    @Basic
    @Column(name = "book_rule_source")
    public String getBookRuleSource() {
        return bookRuleSource;
    }

    public void setBookRuleSource(String bookRuleSource) {
        this.bookRuleSource = bookRuleSource;
    }
}
